package com.gc.ykqx.service.entity;

import java.util.List;

/**
 * Created by wsd on 2017/9/27.
 */

public class LatestWea {

    /**
     * returnCode : 0
     * returnMessage : Query Succeed
     * rowCount : 2
     * colCount : 8
     * DS : [{"precipitation":"0.0","dryBulTemp":"19.3","observTimes":"20171013180000","visibility":"20.0","relHumidity":"60","stationPress":"1009.8","windVelocity":"12.5","stationId":"58472"},{"precipitation":"0.0","dryBulTemp":"19.3","observTimes":"20171013180000","visibility":"20.0","relHumidity":"69","stationPress":"1000.3","windVelocity":"1.1","stationId":"58645"}]
     */

    private int returnCode;
    private String returnMessage;
    private int rowCount;
    private int colCount;
    private List<DSBean> DS;

    public int getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(int returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMessage() {
        return returnMessage;
    }

    public void setReturnMessage(String returnMessage) {
        this.returnMessage = returnMessage;
    }

    public int getRowCount() {
        return rowCount;
    }

    public void setRowCount(int rowCount) {
        this.rowCount = rowCount;
    }

    public int getColCount() {
        return colCount;
    }

    public void setColCount(int colCount) {
        this.colCount = colCount;
    }

    public List<DSBean> getDS() {
        return DS;
    }

    public void setDS(List<DSBean> DS) {
        this.DS = DS;
    }

    public static class DSBean {
        /**
         * precipitation : 0.0
         * dryBulTemp : 19.3
         * observTimes : 20171013180000
         * visibility : 20.0
         * relHumidity : 60
         * stationPress : 1009.8
         * windVelocity : 12.5
         * stationId : 58472
         */

        private String precipitation;
        private String dryBulTemp;
        private String observTimes;
        private String visibility;
        private String relHumidity;
        private String stationPress;
        private String windVelocity;
        private String stationId;

        public String getPrecipitation() {
            return precipitation;
        }

        public void setPrecipitation(String precipitation) {
            this.precipitation = precipitation;
        }

        public String getDryBulTemp() {
            return dryBulTemp;
        }

        public void setDryBulTemp(String dryBulTemp) {
            this.dryBulTemp = dryBulTemp;
        }

        public String getObservTimes() {
            return observTimes;
        }

        public void setObservTimes(String observTimes) {
            this.observTimes = observTimes;
        }

        public String getVisibility() {
            return visibility;
        }

        public void setVisibility(String visibility) {
            this.visibility = visibility;
        }

        public String getRelHumidity() {
            return relHumidity;
        }

        public void setRelHumidity(String relHumidity) {
            this.relHumidity = relHumidity;
        }

        public String getStationPress() {
            return stationPress;
        }

        public void setStationPress(String stationPress) {
            this.stationPress = stationPress;
        }

        public String getWindVelocity() {
            return windVelocity;
        }

        public void setWindVelocity(String windVelocity) {
            this.windVelocity = windVelocity;
        }

        public String getStationId() {
            return stationId;
        }

        public void setStationId(String stationId) {
            this.stationId = stationId;
        }
    }

    @Override
    public String toString() {
        StringBuffer sb = new StringBuffer();
        for (LatestWea.DSBean ds : DS) {
            sb.append("站号:").append(ds.stationId + " ").append("温度:").append(ds.dryBulTemp + " ")
                    .append("降水:").append(ds.precipitation).append("风速:").append(ds.windVelocity + " ").append("能见度：").append(ds.visibility + " ")
                    .append("相对湿度:").append(ds.relHumidity + " ").append("气压").append(ds.stationPress).append("/n");
        }
        return sb.toString();
    }
}
